cd "___YOUR_PATH_HERE___"
use 5_year.dta

cd "___YOUR_PATH_HERE___\supplement"


#delimit ;
***** CKAOPEN **********;

qui xtivreg2 dckaopen_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter lckaopen_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod6ckaopen;

qui xtivreg2 dckaopen_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter polity2_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod7ckaopen;

qui xtivreg2 dckaopen_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 polity2_5 counter lckaopen_5 
  (lcrisis_5 = listar_5 distar_5) , fe cluster(iso_num); 
est stor mod8ckaopen;

esttab mod6ckaopen mod7ckaopen mod8ckaopen, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) label
 scalars(idstat idp widstat j jp) ;
esttab mod6ckaopen mod7ckaopen mod8ckaopen using table3_otherdvs.csv, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) 
  scalars(idstat idp widstat j jp) replace;




qui xtivreg2 dk3_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter lk3_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod6k3;

qui xtivreg2 dk3_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter polity2_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod7k3;

qui xtivreg2 dk3_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 polity2_5 counter lk3_5 
  (lcrisis_5 = listar_5 distar_5) , fe cluster(iso_num); 
est stor mod8k3;

esttab mod6k3 mod7k3 mod8k3, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) label
 scalars(idstat idp widstat j jp) ;
esttab mod6k3 mod7k3 mod8k3 using table3_otherdvs.csv, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) 
  scalars(idstat idp widstat j jp) append ;



#delimit ;
***** S_CAP **********;

qui xtivreg2 ds_cap_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter ls_cap_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod6s_cap;

qui xtivreg2 ds_cap_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 counter polity2_5 
  (lcrisis_5 = listar_5 distar_5) , fe; 
est stor mod7s_cap;

qui xtivreg2 ds_cap_5 cabalance_5 lngdp_ppp2000_5 lngdppc_ppp2000_5 gov_fce_5 growth_gdppc2000_5
  ln_inf_5 privcred_gdp_5 reserves_imports_5 savings_5 trade_5 peg_5 polity2_5 counter ls_cap_5 
  (lcrisis_5 = listar_5 distar_5) , fe cluster(iso_num); 
est stor mod8s_cap;

esttab mod6s_cap mod7s_cap mod8s_cap, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) label
 scalars(idstat idp widstat j jp) ;
esttab mod6s_cap mod7s_cap mod8s_cap using table3_otherdvs.csv, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) 
  scalars(idstat idp widstat j jp) append ;
